package org.jeecg.modules.asset.tenantManagement.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.asset.tenantManagement.entity.TenantManagement;
import org.jeecg.modules.asset.tenantManagement.entity.TenantManagementView;
import org.jeecg.modules.system.entity.SysUser;

/**
 * @Description: 租户管理
 * @Author: jeecg-boot
 * @Date:   2020-04-01
 * @Version: V1.0
 */
public interface TenantManagementMapper extends BaseMapper<TenantManagement> {
    /**
     * 分页查询
     */
    @Select("select a.tenant_name,a.management_name,a.management_phone,a.user_time_limit,b.id as userId,a.id as tenantId from tenant_management a ,sys_user b where a.management_name=b.username")
    IPage<TenantManagementView> queryTenant(Page<TenantManagementView> page);

}
